package com.naiterui.ehp.bs.patient.dao.impl;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;

import com.naiterui.ehp.bp.domain.education.EduAnalysis;
import com.naiterui.ehp.bp.domain.education.EduInfo;
import com.naiterui.ehp.bs.patient.dao.IEduDao;
import com.naiterui.ehp.bs.patient.repository.IApEduAnalysisRepository;
import com.naiterui.ehp.bs.patient.repository.IApEduInfoRepository;

@Component
public class ApEduDaoImpl implements IEduDao {

    @Autowired
    private IApEduAnalysisRepository eduRepository;
    @Autowired
    private IApEduInfoRepository eduInfoRepository;

    @Override
    public EduAnalysis getEduAnalysis(Long eduId, Long doctorId, String messageId) {
        return eduRepository.findFirstByEduIdAndDoctorIdAndMessageId(eduId, doctorId, messageId);
    }

    @Override
    public EduInfo getEduById(Long eduId) {
        return eduInfoRepository.get(eduId);
    }

}
